﻿using BepInEx;
using BepInEx.Configuration;
using DiverseStudents.Mods;
using HarmonyLib;

namespace DiverseStudents
{
    [BepInPlugin("DiverseMain", "DiverseMain", "0.0.4")]
    public class DiverseMain : BaseUnityPlugin
    {
        private void Start()
        {
            LoadCfg();
            Harmony.CreateAndPatchAll(typeof(ModsView));
        }

        private void LoadCfg()
        {
            DConfig.logPrint = Config.Bind(new ConfigDefinition("DiverseCfg", "DLog"), false,new ConfigDescription("是否启用日志")).Value;
            DConfig.loadPath = Config.Bind(new ConfigDefinition("DiverseCfg", "LoadPath"),".\\Mods", new ConfigDescription("需要加载的模组的根路径")).Value;
            DConfig.savePath = Config.Bind(new ConfigDefinition("DiverseCfg", "SavePath"),".\\SaveMods", new ConfigDescription("创建模组的根路径")).Value;
        }

    }
}
